Micron Document
🎖️GitЯра🎖️


Displaying Rendered • View rawDownload

conductor/tech-stack.md f07624be882e679affc02931dc75e8cb1594de18 (f07624be) Text, 3.11 KB

Tech Stack

Programming Language
Kotlin Multiplatform (KMP): The core logic is shared across Android, Desktop, and iOS using T383838commonMain.

Frontend Frameworks
Compose Multiplatform: Shared UI layer for rendering on Android and Desktop.
Jetpack Compose: Used where platform-specific UI (like charts or permissions) is necessary on Android.

Background & Services
Platform Services: Core service orchestrations and background work are abstracted into T383838core:service to maximize logic reuse across targets, using platform-specific implementations (e.g., WorkManager/Service on Android) only where necessary.

Architecture
MVI / Unidirectional Data Flow: Shared view models using the multiplatform T383838androidx.lifecycle.ViewModel.
JetBrains Navigation 3: Multiplatform fork for state-based, compose-first navigation without relying on T383838NavController. Navigation graphs are decoupled and extracted into their respective T383838feature:* modules, allowing a thinned out root T383838app module.

Dependency Injection
Koin 4.2: Leverages Koin Annotations and the K2 Compiler Plugin for pure compile-time DI, completely replacing Hilt.

Database & Storage
Room 3 KMP: Shared local database using multiplatform T383838DatabaseConstructor and platform-appropriate SQLite drivers (e.g., T383838BundledSQLiteDriver for JVM/Desktop, Framework driver for Android).
Jetpack DataStore: Shared preferences.

Networking & Transport
Ktor: Multiplatform HTTP client for web services and TCP streaming.
Kable: Multiplatform BLE library used as the primary BLE transport for all targets (Android, Desktop, and future iOS).
jSerialComm: Cross-platform Java library used for direct Serial/USB communication with Meshtastic devices on the Desktop (JVM) target.
KMQTT: Kotlin Multiplatform MQTT client and broker used for MQTT transport, replacing the Android-only Paho library.
Coroutines & Flows: For asynchronous programming and state management.

Testing (KMP)
Shared Tests First: The majority of business logic, ViewModels, and state interactions are tested in the T383838commonTest source set using standard T383838kotlin.test.
Coroutines Testing: Use T383838kotlinx-coroutines-test for virtual time management in asynchronous flows.
Mocking Strategy: Avoid JVM-specific mocking libraries. Prefer T383838Mokkery or T383838Mockative for multiplatform-compatible mocking interfaces, alongside handwritten fakes in T383838core:testing.
Platform-Specific Verification: Use Robolectric on the Android host target to verify KMP modules that interact with Android framework components (like T383838Uri or T383838Room).
Subclassing Pattern: Maintain a unified test suite by defining abstract base tests in T383838commonTest and platform-specific subclasses in T383838jvmTest and T383838androidHostTest for initialization (e.g., calling T383838setupTestContext()).
Flow Assertions: Use T383838Turbine for testing multiplatform T383838Flow emissions and state updates.
Property-Based Testing: Use T383838Kotest for multiplatform data-driven and property-based testing scenarios.

Served by rngit 1.5.0 - Generated in 0.07s